#!/bin/bash

# ref https://qizhanming.com/blog/2019/01/25/how-to-install-docker-ce-on-centos-7

yum remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-engine

yum update -y
yum install -y yum-utils \
  device-mapper-persistent-data \
  lvm2
yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo

yum update -y
yum install -y docker-ce

usermod -aG docker root

systemctl enable docker

systemctl start docker


